Optimal. Leaf size=56 \[ -\frac {a^3 \cot (c+d x)}{d}+\frac {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2872, 3770, 3767, 8, 2648} \[ -\frac {a^3 \cot (c+d x)}{d}+\frac {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2648
Rule 2872
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \csc ^2(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx &=a^2 \int \left (3 a \csc (c+d x)+a \csc ^2(c+d x)-\frac {4 a}{-1+\sin (c+d x)}\right ) \, dx\\ &=a^3 \int \csc ^2(c+d x) \, dx+\left (3 a^3\right ) \int \csc (c+d x) \, dx-\left (4 a^3\right ) \int \frac {1}{-1+\sin (c+d x)} \, dx\\ &=-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}-\frac {a^3 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.37, size = 96, normalized size = 1.71 \[ \frac {a^3 \left (\tan \left (\frac {1}{2} (c+d x)\right )-\cot \left (\frac {1}{2} (c+d x)\right )+6 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-6 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+\frac {16 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 194, normalized size = 3.46 \[ -\frac {10 \, a^{3} \cos \left (d x + c\right )^{2} + 2 \, a^{3} \cos \left (d x + c\right ) - 8 \, a^{3} + 3 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3} + {\left (a^{3} \cos \left (d x + c\right ) + a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3} + {\left (a^{3} \cos \left (d x + c\right ) + a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (5 \, a^{3} \cos \left (d x + c\right ) + 4 \, a^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right )^{2} + {\left (d \cos \left (d x + c\right ) + d\right )} \sin \left (d x + c\right ) - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 98, normalized size = 1.75 \[ \frac {6 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 14 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.61, size = 93, normalized size = 1.66 \[ \frac {4 a^{3}}{d \cos \left (d x +c \right )}+\frac {3 a^{3} \tan \left (d x +c \right )}{d}+\frac {3 a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}+\frac {a^{3}}{d \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {2 a^{3} \cot \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 88, normalized size = 1.57 \[ \frac {3 \, a^{3} {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 2 \, a^{3} {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )} + 6 \, a^{3} \tan \left (d x + c\right ) + \frac {2 \, a^{3}}{\cos \left (d x + c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.97, size = 86, normalized size = 1.54 \[ \frac {3\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^3-17\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}+\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________